<!DOCTYPE html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="第三方框架,RxJava,RxAndroid,事件通讯," />










<meta name="description" content="RxBus是一个基于RxJava和RxAndroid的事件通讯工具">
<meta name="keywords" content="第三方框架,RxJava,RxAndroid,事件通讯">
<meta property="og:type" content="article">
<meta property="og:title" content="基于RxJava的RxBus">
<meta property="og:url" content="http://yoursite.com/2017/03/08/基于RxJava的RxBus/index.html">
<meta property="og:site_name" content="SISYPHUSER">
<meta property="og:description" content="RxBus是一个基于RxJava和RxAndroid的事件通讯工具">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2018-03-03T05:20:53.903Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="基于RxJava的RxBus">
<meta name="twitter:description" content="RxBus是一个基于RxJava和RxAndroid的事件通讯工具">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2017/03/08/基于RxJava的RxBus/"/>





  <title>基于RxJava的RxBus | SISYPHUSER</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">SISYPHUSER</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-word">
          <a href="/word/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-calendar"></i> <br />
            
            word
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/03/08/基于RxJava的RxBus/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Andy">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="SISYPHUSER">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">基于RxJava的RxBus</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-03-08T15:34:40+08:00">
                2017-03-08
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Android/" itemprop="url" rel="index">
                    <span itemprop="name">Android</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>RxBus是一个基于RxJava和RxAndroid的事件通讯工具</p>
<a id="more"></a>
<p>首先需要导入RxJava，RxAndroid库</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">compile &apos;io.reactivex:rxandroid:1.2.1&apos;</span><br><span class="line">compile &apos;io.reactivex:rxjava:1.1.6&apos;</span><br></pre></td></tr></table></figure>
<p>RxBus基本代码</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line">public class RxBus &#123;</span><br><span class="line">    private static volatile RxBus defaultInstance;</span><br><span class="line"></span><br><span class="line">    private Subject&lt;Object,Object&gt; bus;</span><br><span class="line">    public RxBus()&#123;</span><br><span class="line">        bus=new SerializedSubject&lt;&gt;(PublishSubject.create());</span><br><span class="line">    &#125;</span><br><span class="line">    //单例</span><br><span class="line">    public static RxBus getInstance()&#123;</span><br><span class="line">        if(defaultInstance==null)&#123;</span><br><span class="line">            synchronized(RxBus.class)&#123;</span><br><span class="line">                if(defaultInstance==null)&#123;</span><br><span class="line">                    defaultInstance=new RxBus();</span><br><span class="line">                &#125;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">        return defaultInstance;</span><br><span class="line">    &#125;</span><br><span class="line">    //发送一个事件</span><br><span class="line">    public void post(Object o)&#123;</span><br><span class="line">        bus.onNext(o);</span><br><span class="line">    &#125;</span><br><span class="line">    </span><br><span class="line">    public &lt;T&gt; Observable&lt;T&gt; toObservable(Class&lt;T&gt; eventType)&#123;</span><br><span class="line">        return bus.ofType(eventType);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>使用</p>
<p> <strong>1. 发出事件</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">Student s=new Student();</span><br><span class="line">s.setName(&quot;sss&quot;);</span><br><span class="line">RxBus.getInstance().post(s);</span><br></pre></td></tr></table></figure>
<p><strong>2.消费事件</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">subscribe = RxBus.getInstance().toObservable(Student.class)</span><br><span class="line">		//在io线程进行订阅，可以执行一些耗时操作</span><br><span class="line">		.subscribeOn(Schedulers.io())</span><br><span class="line">		//在主线程进行观察，可做UI更新操作</span><br><span class="line">		.observeOn(AndroidSchedulers.mainThread())</span><br><span class="line">		//观察的对象</span><br><span class="line">		.subscribe(new Action1&lt;Student&gt;() &#123;</span><br><span class="line">		@Override</span><br><span class="line">		public void call(Student s) &#123;</span><br><span class="line">			Toast.makeText(MainActivity.this, s.getName(), Toast.LENGTH_SHORT).show();</span><br><span class="line">			&#125;</span><br><span class="line">     	&#125;);</span><br></pre></td></tr></table></figure>
<p><strong>3.在onDestory中移除订阅</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">@Override</span><br><span class="line">protected void onDestroy() &#123;</span><br><span class="line">    super.onDestroy();</span><br><span class="line">    if(!subscribe.isUnsubscribed()) &#123;</span><br><span class="line">        subscribe.unsubscribe();</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>与EventBus相同RxBus也可以使用黏性事件<br>修改过后的支持黏性事件的RxBus</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br></pre></td><td class="code"><pre><span class="line">public class RxBus &#123;</span><br><span class="line">    private static volatile RxBus defaultInstance;</span><br><span class="line">    private final Map&lt;Class&lt;?&gt;,Object&gt; mStickyEventMap;</span><br><span class="line"></span><br><span class="line">    private Subject&lt;Object,Object&gt; bus;</span><br><span class="line">    public RxBus()&#123;</span><br><span class="line">        bus=new SerializedSubject&lt;&gt;(PublishSubject.create());</span><br><span class="line">        mStickyEventMap=new ConcurrentHashMap&lt;&gt;();</span><br><span class="line">    &#125;</span><br><span class="line">    //单例</span><br><span class="line">    public static RxBus getInstance()&#123;</span><br><span class="line">        if(defaultInstance==null)&#123;</span><br><span class="line">            synchronized(RxBus.class)&#123;</span><br><span class="line">                if(defaultInstance==null)&#123;</span><br><span class="line">                    defaultInstance=new RxBus();</span><br><span class="line">                &#125;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">        return defaultInstance;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * 发送一个事件</span><br><span class="line">     * @param o</span><br><span class="line">     */</span><br><span class="line">    public void post(Object o)&#123;</span><br><span class="line">        bus.onNext(o);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    public &lt;T&gt; Observable&lt;T&gt; toObservable(Class&lt;T&gt; eventType)&#123;</span><br><span class="line">        return bus.ofType(eventType);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    //sticky事件</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * 发送sticky事件</span><br><span class="line">     * @param event</span><br><span class="line">     */</span><br><span class="line">    public void postSticky(Object event)&#123;</span><br><span class="line">        synchronized (mStickyEventMap)&#123;</span><br><span class="line">            mStickyEventMap.put(event.getClass(),event);</span><br><span class="line">        &#125;</span><br><span class="line">        post(event);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    public &lt;T&gt; Observable&lt;T&gt; toObservableSticky(final Class&lt;T&gt; eventType)&#123;</span><br><span class="line">        synchronized (mStickyEventMap)&#123;</span><br><span class="line">            Observable&lt;T&gt; observable = bus.ofType(eventType);</span><br><span class="line">            final Object event=mStickyEventMap.get(eventType);</span><br><span class="line">            if(event!=null)&#123;</span><br><span class="line">                return observable.mergeWith(Observable.create(new Observable.OnSubscribe&lt;T&gt;() &#123;</span><br><span class="line">                    @Override</span><br><span class="line">                    public void call(Subscriber&lt;? super T&gt; subscriber) &#123;</span><br><span class="line">                        subscriber.onNext(eventType.cast(event));</span><br><span class="line">                    &#125;</span><br><span class="line">                &#125;));</span><br><span class="line">            &#125;else&#123;</span><br><span class="line">                return observable;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * 获取sticky事件</span><br><span class="line">     * @param eventType</span><br><span class="line">     * @param &lt;T&gt;</span><br><span class="line">     * @return</span><br><span class="line">     */</span><br><span class="line">    public &lt;T&gt; T getStickyEvent(Class&lt;T&gt; eventType)&#123;</span><br><span class="line">        synchronized(mStickyEventMap)&#123;</span><br><span class="line">            return eventType.cast(mStickyEventMap.get(eventType));</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * 移除指定的sticky事件</span><br><span class="line">     * @param eventType</span><br><span class="line">     * @param &lt;T&gt;</span><br><span class="line">     * @return</span><br><span class="line">     */</span><br><span class="line">    public &lt;T&gt; T removeStickyEvent(Class&lt;T&gt; eventType)&#123;</span><br><span class="line">        synchronized (mStickyEventMap)&#123;</span><br><span class="line">            return eventType.cast(mStickyEventMap.remove(eventType));</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * 移除所有sticky事件</span><br><span class="line">     */</span><br><span class="line">    public void removeAllStickyEvents()&#123;</span><br><span class="line">        synchronized (mStickyEventMap)&#123;</span><br><span class="line">            mStickyEventMap.clear();</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>要发送黏性事件需要使用postSticky()发送事件使用toObservableSticky接受事件，与其他使用与普通事件相同</p>
<p>由于黏性事件保存在RxBus中，当不需要使用时除了要subscribe.unsubscribe()取消订阅还需要<br>RxBus.getInstance().removeStickyEvent(Class);移除粘性事件</p>
<p>关于RxJava中的异常<br>当RxJava中发生异常时会调用onError方法，并且结束整个订阅事件，这会导致之后发出的事件不能接受的问题，需要用try…catch…捕捉异常</p>
<p><strong>参考博客：</strong><br><a href="http://www.jianshu.com/p/ca090f6e2fe2/" target="_blank" rel="noopener">用RxJava实现事件总线(Event Bus)</a><br><a href="http://www.jianshu.com/p/71ab00a2677b" target="_blank" rel="noopener">[深入RxBus]：支持Sticky事件</a><br><a href="http://www.jianshu.com/p/0493cc28a811" target="_blank" rel="noopener">[深入RxBus]：异常处理</a></p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/第三方框架/" rel="tag"># 第三方框架</a>
          
            <a href="/tags/RxJava/" rel="tag"># RxJava</a>
          
            <a href="/tags/RxAndroid/" rel="tag"># RxAndroid</a>
          
            <a href="/tags/事件通讯/" rel="tag"># 事件通讯</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/03/07/Java Object的clone方法/" rel="next" title="Java Object的clone方法">
                <i class="fa fa-chevron-left"></i> Java Object的clone方法
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/03/13/日夜模式切换/" rel="prev" title="日/夜模式切换">
                日/夜模式切换 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      

      <section class="site-overview-wrap sidebar-panel sidebar-panel-active">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/images/avatar.gif"
                alt="Andy" />
            
              <p class="site-author-name" itemprop="name">Andy</p>
              <p class="site-description motion-element" itemprop="description">Something Wrong</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">18</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">6</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">28</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Andy</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Mist</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
